﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ForgottenPassword.aspx.cs" Inherits="Ewma.Account.ForgottenPassword" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
- How embarrassing
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <asp:PasswordRecovery 
    OnVerifyingUser="validateUserEmail" 
    SuccessText="Your password has been sent to you. Please make sure to check your trash folder for mail from passwordrecovery@app695.mailgun.org" 
    QuestionFailureText="Incorrect answer. Please try again." 
    runat="server" 
    ID="PWRecovery" 
    Height="263px" 
    Width="917px" 
    UserNameFailureText="Username not found."
    SubmitButtonText="Send password"
    >
    
    <TitleTextStyle Font-Bold="True" />
    <InstructionTextStyle BorderWidth="1px" />

    <MailDefinition 
      IsBodyHtml="true" 
      From="passwordrecovery@app695.mailgun.org" 
      Subject="Your forgotten password from Even Worse Minton" 
      Priority="High"
    />

    <UserNameTemplate>
      <p><b>
      So, apparently you managed to kick your beloved EWMA password out of your long term memory... You must feel real low now!
      </b></p><p>
        Worry no longer, my young padminwan; 
        enter your user name, and a new temporary password will be generated for you and posted on your Facebook wall for everyone to see the misery you are in. 
        Nah, just kidding, it will be sent to your registered e-mail address. 
        You still remember your user name, do you ?
      </p>
      <p>
        Enter your user name:
        <br />
          <asp:TextBox ID="Username" runat="server" Width="278px" />
        <br />
        Enter your e-mail:
        <br />
          <asp:TextBox ValidationGroup="PWRecovery" runat="server" ID="EmailAddressTB" 
                Width="278px" />
        <br />
        Prove that you are not a robot:
        <br />
          <asp:CheckBox ID="notrobot" runat="server" Text="I can let harm happen to a human being by my own inaction" />
        <br />
          <recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="<%$appSettings:RecaptchaPublicKey %>" PrivateKey="<%$appSettings:RecaptchaPrivateKey %>" />
        <br />
          <asp:Button ID="submit" CausesValidation="true" ValidationGroup="PWRecovery" runat="server" CommandName="Submit" Text="Reset my password" />
      </p>
      <p class="Error">
        <asp:Literal ID="ErrorLiteral" runat="server" />
      </p>
    </UserNameTemplate>
    <QuestionTemplate>
        Hello
        <asp:Literal runat="server" ID="personname" />,
        <p>
            You must answer your recovery question 
            in order to have a new email sent to you.
        </p>
        <dl>
            <dt>Question:</dt>
            <dd>
                <asp:Literal runat="server" ID="Question" />
            </dd>
            <dt></dt>
            <dt>Answer:</dt>
            <dd>
                <asp:TextBox runat="server" ID="Answer" />
            </dd>
            <dt></dt>
            <dd>
                <asp:Button runat="server" ID="submit" 
                  Text="Submit" CommandName="submit" />
            </dd>
            <dt></dt>
            <dd>
                <p class="Error">
                    <asp:Literal ID="FailureText" runat="server">
    </asp:Literal>
    </p>
            </dd>
        </dl>
    </QuestionTemplate>
</asp:PasswordRecovery>
</asp:Content>
